{% extends "profilebase.html" %}

{% block sidebar2 %}
{% if profileOwner %}
	{% if currentUser.category == "institute" %}
		<h4>About Us</h4>
	{% else %}
		<h4>About Me</h4>
	{% endif %}
{% else %}
	<h4>About {{ currentUser.abstract_user.user.username }}</h4>
{% endif %}

{% if profileOwner %}
	{% if currentUser.category == "institute" %}
		<h5>About: </h5><p>{{ currentUser.about|default:"Tell us all about your institute" }}</p>
		<h5>Open On: </h5><p>{{ currentUser.open_on|default:"Ahm, is it closed all the time?" }}</p>
		<h5>Open From: </h5><p>{{ currentUser.open_from|default:"Is it open 24hrs aday?" }}</p>
		<h5>Open To: </h5><p>{{ currentUser.open_to|default:"Never closes?"}}</p>
		<h5>Address: </h5><p>{{ currentUser.address|default:"Even if you're located on Mars, you can tell us, we really don't mind" }}</p>
	{% else %}					
		<h5>Date of Birth: </h5><p>{{ currentUser.dob|default:"Not entered yet" }}</p>
		<h5>Gender: </h5><p>{{ currentUser.gender|default:"Are you unsure?" }}</p>
		<h5>Experience: </h5><p>{{ currentUser.experience|default:"Come on, BRAG!" }}</p>
		<h5>Favourite Genre/s: </h5><p>{{ currentUser.favourite_genre|default:"Hmm, you must like something, right?" }}</p>
		<h5>Instrument/s Played: </h5><p>{{ currentUser.instrument_played|default:"Ahm, it is kind of in the definition of a musician to play something. Unless you're a vocalist...'" }}</p>
		<h5>Jamming Style: </h5><p>{{ currentUser.jamming_style|default:"Tell us..." }}</p>
		{% if currentUser.category == "institute" %}
			<h5>Teach: </h5><p>{{ currentUser.teaches|default:"Advertise for yourself..." }}</p>
		{% endif %}
	{% endif %}
	<a href="/editInfo/">Edit My Info</a> - 
	{% if photoPath %}	
		<a href="/myprofile/uploadImage/">Change Photo</a>
	{% else %}
		<a href="/myprofile/uploadImage/">Upload a Photo</a>
	{% endif %}
{% else %}
	{% if currentUser.category == "institute" %}
		{% if currentUser.about %}
			<h5>About: </h5><p>{{ currentUser.about }}</p>
		{% endif %}
		{% if currentUser.open_on %} 
			<h5>Open On: </h5><p>{{ currentUser.open_on }}</p> 
		{% endif %}
		{% if currentUser.open_from %} 
			<h5>Open From: </h5><p>{{ currentUser.open_from }}</p> 
		{% endif %}
		{% if currentUser.open_to %} 
			<h5>Open To: </h5><p>{{ currentUser.open_to }}</p> 
		{% endif %}
		{% if currentUser.address %} 
			<h5>Address: </h5><p>{{ currentUser.address }}</p> 
		{% endif %}
		
	{% else %}
	
		{% if currentUser.dob %} 
			<h5>Date of Birth: </h5><p>{{ currentUser.dob }}</p> 
		{% endif %}
		{% if currentUser.gender %} 
			<h5>Gender: </h5><p>{{ currentUser.gender }}</p> 
		{% endif %}
		{% if currentUser.experience %} 
			<h5>Experience: </h5><p>{{ currentUser.experience }}</p> 
		{% endif %}
		{% if currentUser.favourite_genre %} 
			<h5>Favourite Genre/s: </h5><p>{{ currentUser.favourite_genre }}</p> 
		{% endif %}
		{% if currentUser.instrument_played %} 
			<h5>Instrument/s Played: </h5><p>{{ currentUser.instrument_played }}</p> 
		{% endif %}
		{% if currentUser.jamming_style %} 
			<h5>Jamming Style: </h5><p>{{ currentUser.jamming_style }}</p> 
		{% endif %}
		
		{% if currentUser.category == "teacher" %}
			{% if currentUser.teaches %}
				<h5>Teach: </h5><p>{{ currentUser.teaches }}</p>
			{% endif %}
		{% endif %}
			
	{% endif %}
	
{% endif %}
{% endblock %}

{% block content %}

<div style="font-size:30;">Reviews</div>

<small>What everyone thinks of {{ currentUser.abstract_user.user.username }}'s {% if media.video_id %}video{% else %}track{% endif %}</small>
<br/><br/>
	{%  if media.video_id %}
		<iframe width="560" height="315" src="http://www.youtube.com/embed/{{ media.video_id }}" frameborder="0" allowfullscreen></iframe>
		<br/>
		{% if not profileOwner and areFriends %}
			<small><a href="/myprofile/review/{{ update.id }}/{{ currentUser.abstract_user.id }}/">review</a></small>
		{% endif %}
	{% else %}
		<object height="100" width="100%"> 
			<param name="movie" value={{ media.mp3_url }}/> 
		</object> 
	<br/>
	{% if not profileOwner and areFriends %}
		<small><a href="/myprofile/review/{{ update.id }}/{{ currentUser.abstract_user.id }}/">review</a></small>
	{% endif %}
	{% endif %}
	<br/><br/>
{% comment %}
{% if not profileOwner and areFriends %}
	<form action="/myprofile/postMediaReview/{{ currentUser.abstract_user.id }}/{{ media.id }}/" method="POST">{% csrf_token %}
	
	<textarea name="content" size=80 style="height:100px;"></textarea><br/>
	
	<input type="submit" id="search_btn" value="Post"><br /><br /><br />
	</form>

{% endif %}
{% endcomment %}
{% for review in reviews %}
	<p>
		<a href="/myprofile/{{ review.reviewer.id }}/">
			<font style="vertical-align:top; font-size:19">{{ review.reviewer }}:</font></a>
			<small style="text-align:right;font-style:italic;float:right">{{ review.date }}</small>
			<br/><br/>
		
		<font style="vertical-align:top; font-size:19">{{ review.content|safe }}</font>
		<br/>

		<small style="text-align:right;font-style:italic;float:right">
			{% if review.report_count > 0 %}
				Reported, <a href="/myprofile/report/{{ review.id }}/{{ currentUser.abstract_user.id }}/">Report again</a> 
			{% else %}
				<a href="/myprofile/report/{{ review.id }}/{{ currentUser.abstract_user.id }}/">Report</a>
			{% endif %}
		</small><br/>
		
	</p>
	<br/>
{% endfor %}
{% endblock %}
